<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page language="java" import="java.util.*"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>日报记录</title>
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">

function savaDayWork(){
	var thisWeeklyStartTime = $("#PWI_START_TIME").val();     
	var thisWeeklyEndTime = $("#PWI_END_TIME").val();       
	var nextWeeklyStartTime = $("#PWI_NEXT_WEEK_START").val();     
	var nextWeeklyEndTime = $("#PWI_NEXT_WEEK_END").val();       
	var followWeeklyStartTime = $("#PWI_FOLLOW_WORK_START").val();   
	var followWeeklyEndTime = $("#PWI_FOLLOW_WORK_END").val();  
	if(thisWeeklyStartTime==''){
		$(".promptText_1").html("不能为空");
		return;
	}else{
		$(".promptText_1").html("");
	}
	if(thisWeeklyEndTime==''){
		$(".promptText_2").html("不能为空");
		return;
	}else{
		$(".promptText_2").html("");
	}
	if(nextWeeklyStartTime==''){
		$(".promptText_3").html("不能为空");
		return;
	}else{
		$(".promptText_3").html("");
	}
	if(nextWeeklyEndTime==''){
		$(".promptText_4").html("不能为空");
		return;
	}else{
		$(".promptText_4").html("");
	}
	if(followWeeklyStartTime==''){
		$(".promptText_5").html("不能为空");
		return;
	}else{
		$(".promptText_5").html("");
	}
	if(followWeeklyEndTime==''){
		$(".promptText_6").html("不能为空");
		return;
	}else{
		$(".promptText_6").html("");
	}
	
	 postRequest("form1", {
			actionType : 'weeklyExtraction',
			showSplash:true,
			onComplete : function(responseText) {
				hideSplash();
				if(responseText=='true'){
					parent.refreshPage();
				}else{
					jAlert(responseText);
				}
				
			}
		});	
} 

function inputCheck(obj,index){
	jAlert('')
	var thisValue = $(obj).val();
	var proptClassName = '.promptText_'+index;
	if(''== thisValue){
		$(proptClassName).html("不能为空");
	}else{
		$(proptClassName).html("");
	}
}
</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
		<%@include file="/jsp/inc/message.inc.jsp"%>
<div id="__ParamBar__" style="float: right;">&nbsp;</div>
<div id="__ToolBar__">
<table border="0" cellpadding="0" cellspacing="1">
	<tr>
	   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="savaDayWork()"><input value="&nbsp;" type="button" class="saveImgBtn" id="saveImgBtn" title="保存" />保存</td>
	   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="parent.PopupBox.closeCurrent()"><input value="&nbsp;" type="button" class="closeImgBtn" title="关闭" />关闭</td>
	</tr>
</table>
</div>
<table class="detailTable" cellspacing="0" cellpadding="0" id="msgTable">
<tr>
	<th width="100" nowrap>总结开始日期</th>
	<td><input id="PWI_START_TIME" oninput="inputCheck(this,1)" label="总结开始日期" name="PWI_START_TIME" type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_START_TIME")%>" size="24" class="text" /><img id="PST_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_1" style="color:red"></span>
</td>
</tr>
<tr>
	<th width="100" nowrap>总结结束日期</th>
	<td><input id="PWI_END_TIME" label="总结结束日期" name="PWI_END_TIME" type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_END_TIME")%>" size="24" class="text" /><img id="PET_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_2" style="color:red"></span>
</td>
</tr>
<tr>
	<th width="100" nowrap>下周计划开始日期</th>
	<td><input id="PWI_NEXT_WEEK_START" label="下周计划开始日期" name="PWI_NEXT_WEEK_START" type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_NEXT_WEEK_START")%>" size="24" class="text" /><img id="PNWS_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_3" style="color:red"></span>
</td>
</tr>
<tr>
	<th width="100" nowrap>下周计划结束日期</th>
	<td><input id="PWI_NEXT_WEEK_END" label="下周计划结束日期" name="PWI_NEXT_WEEK_END" type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_NEXT_WEEK_END")%>" size="24" class="text" /><img id="PNWE_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_4" style="color:red"></span>
</td>
</tr>
<tr>
	<th width="100" nowrap>后续计划开始日期</th>
	<td><input id="PWI_FOLLOW_WORK_START" label="后续计划开始日期" name="PWI_FOLLOW_WORK_START"  type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_FOLLOW_WORK_START")%>" size="24" class="text" /><img id="PFWS_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_5" style="color:red"></span>
</td>
</tr>
<tr>
	<th width="100" nowrap>后续计划结束日期</th>
	<td><input id="PWI_FOLLOW_WORK_END" label="后续计划结束日期" name="PWI_FOLLOW_WORK_END" type="text" readonly="readonly" value="<%=pageBean.inputDate("PWI_FOLLOW_WORK_END")%>" size="24" class="text" /><img id="PFWE_TIMEPicker" src="images/calendar.gif" width="16" height="16" alt="日期/时间选择框" />
    <span class="promptText_6" style="color:red"></span>
</td>
</tr>
</table>

<input type="hidden" name="actionType" id="actionType" value=""/>
<input type="hidden" name="operaType" id="operaType" value="<%=pageBean.getOperaType()%>"/>
<input type="hidden" name="PWI_EMAILL_THEME" id="PWI_EMAILL_THEME" value="<%=pageBean.inputDate("PWI_EMAILL_THEME")%>"/>
<input type="hidden" name="PWI_ID" id="PWI_ID" value="<%=pageBean.inputDate("PWI_ID")%>"/>
<input type="hidden" name="lastWeeklyEndTime" id="lastWeeklyEndTime" value="<%=pageBean.inputDate("lastWeeklyEndTime")%>"/>

</form>
<script language="javascript">
initCalendar('PWI_START_TIME','%Y-%m-%d','PST_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_START_TIME");

initCalendar('PWI_END_TIME','%Y-%m-%d','PET_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_END_TIME");

initCalendar('PWI_NEXT_WEEK_START','%Y-%m-%d','PNWS_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_NEXT_WEEK_START");

initCalendar('PWI_NEXT_WEEK_END','%Y-%m-%d','PNWE_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_NEXT_WEEK_END");

initCalendar('PWI_FOLLOW_WORK_START','%Y-%m-%d','PFWS_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_FOLLOW_WORK_START");

initCalendar('PWI_FOLLOW_WORK_END','%Y-%m-%d','PFWE_TIMEPicker');
datetimeValidators[0].set("yyyy-MM-dd").add("PWI_FOLLOW_WORK_END");

initDetailOpertionImage();
</script>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
